<?php
global $sostenitori, $amici, $database; 

// Controllo adesione accettata
$query = "SELECT * FROM #__users WHERE username = '" . $row->username . "'";
$database->setQuery( $query );
$user = $database->loadAssoc();

// Se utente attivo
if($user && $user["block"] == 0) {
	// Smisto in lista
	if($row->type == 'S') {
		$sostenitori[] = $row->surname . " " . $row->name;	
	} else {
		$amici[] = $row->surname . " " . $row->name;
	}
		
}
?>